package com.luckdraw.domain;

import java.util.Date;

import org.nutz.dao.entity.annotation.ColDefine;
import org.nutz.dao.entity.annotation.ColType;
import org.nutz.dao.entity.annotation.Column;
import org.nutz.dao.entity.annotation.Name;
import org.nutz.dao.entity.annotation.Table;

@Table("LuckDraw_Order")
public class Order {
	
	public static final String PAY_TYPE_WX = "WEIXIN";
	
	public static final String PAY_TYPE_BALANCE = "BALANCE";
	
	/**
	 * 订单ID
	 */
	@Name
	@Column("order_id")
	@ColDefine(type=ColType.VARCHAR,notNull=true,width=36)
	private String orderId;
	
	/**
	 * 用户ID
	 */
	@Column("user_id")
	@ColDefine(type=ColType.VARCHAR,notNull=true,width=36)
	private String userId;

	/**
	 * 支付方式
	 */
	@Column("pay_type")
	@ColDefine(type=ColType.VARCHAR,notNull=true,width=20)
	private String payType;
	
	/**
	 * 活动ID
	 */
	@Column("activity_id")
	@ColDefine(width=10,precision=0)
	private int activityId;
	
	/**
	 * 支付金额
	 */
	@Column("amount")
	@ColDefine(width=10,precision=0)
	private int amount;
	
	/**
	 * 微信预支付
	 */
	@Column("prepay_id")
	@ColDefine(type=ColType.VARCHAR,width=64)
	private String prepayId;
	
	/**
	 * 微信支付订单
	 */
	@Column("transaction_id")
	@ColDefine(type=ColType.VARCHAR,width=36)
	private String transactionId;
	
	/**
	 * 支付完成时间
	 */
	@Column("pay_time")
	private Date payTime;
	
	/**
	 * 支付状态 0 未支付 1 已支付
	 */
	@Column("status")
	@ColDefine(width=4,precision=0)
	private Integer status;

	public String getOrderId() {
		return orderId;
	}

	public void setOrderId(String orderId) {
		this.orderId = orderId;
	}

	public String getUserId() {
		return userId;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}

	public int getAmount() {
		return amount;
	}

	public void setAmount(int amount) {
		this.amount = amount;
	}

	public String getTransactionId() {
		return transactionId;
	}

	public void setTransactionId(String transactionId) {
		this.transactionId = transactionId;
	}

	public Date getPayTime() {
		return payTime;
	}

	public void setPayTime(Date payTime) {
		this.payTime = payTime;
	}

	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public String getPrepayId() {
		return prepayId;
	}

	public void setPrepayId(String prepayId) {
		this.prepayId = prepayId;
	}

	public int getActivityId() {
		return activityId;
	}

	public void setActivityId(int activityId) {
		this.activityId = activityId;
	}
	
	public String getPayType() {
		return payType;
	}

	public void setPayType(String payType) {
		this.payType = payType;
	}
	
}
